<div class="detailsBox">

<form action="/bank/save_loan"  method ="GET" id="bank"  class="action-ajax-form action-ajax-form-valid" >
   <div class="openBox">
	<h3>
		<i class="jtIco"></i>填写放款数据
	</h3>
	<div class="detaiTab">
			<table align="center" width="60%" cellspacing="0" cellpadding="0" border="0">
					<tbody>
						<tr>
							<td width="15%" align="right" class="bg">
								贷款申请单号:
							</td>
							<td>
							   ${voo.billCode}
								<input type="hidden" name="billCode" id="billCode" value="${voo.billCode}" readonly="readonly" class="tabInp"  >
							</td>
							<td width="15%" align="right" class="bg"> 
								借款证件号码:
							</td> 
							<td>
							${voo.loanerCard}
								<input type="hidden" name="loanerCard" id="loanerCard"  value="${voo.loanerCard}" readonly="readonly" class="tabInp" >
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">
								借款姓名:
							</td>
							<td>
							${voo.loanerName}
								<input type="hidden" name="loanerName"  id="loanerName"  value="${voo.loanerName}" readonly="readonly"  class="tabInp">
							</td>
							<td width="15%" align="right" class="bg">
								放款银行<!-- <span><font color="red">*</font></span> -->:
							</td>
							<td>
							${voo.loanBank}
								<!-- <@select dataSouceType="BANKTYPEO2O" name="Bank" id="Bank" class="action-valid-field" data\-action\-valid\-rule="required;" data\-action\-valid\-msg\-required="放款银行不能为空" />
							    <span class="action-field-error" for="loanBank" style="color:red;"></span>
							    <input type="hidden" name="loanBank" value=""/> -->
							     <input type="hidden" name="loanBank" value="${voo.loanBank}"/>
							      <input type="hidden" name="loanBankCode" value="${voo.loanBankCode}"/>
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">
								贷款申请金额<!-- <span><font color="red">*</font></span> -->:
							</td>
							<td><@numberFormat value="${voo.applyAmount}"/>
							 <input type="hidden" name="applyAmount" value="${voo.applyAmount}"/>
								<!-- <input type="text" name="applyAmount" value="${vo.applyAmount}"  <#if '${vo.applyAmount}'!=null > readonly="readonly"</#if>  class="tabInp w40 action-valid-field" data-action-valid-rule="required;number;maxlength:15;reg:^\d?$|^(\d+(\.\d{1,2})?)$;" data-action-valid-msg-required="贷款申请金额不能为空" >
							    <span class="action-field-error" for="applyAmount" style="color:red;"></span> -->
							</td>
							<td width="15%" align="right" class="bg">
								放款利率<!-- <span><font color="red">*</font></span> -->:
							</td>
							<td>${voo.loanRate}
							 <input type="hidden" name="loanRate" value="${voo.loanRate}"/>
								<!-- <input type="text" name="loanRate" value="" class="tabInp w40 action-valid-field" data-action-valid-rule="required;number;maxlength:15;reg:^\d?$|^(\d+(\.\d{1,2})?)$;" data-action-valid-msg-required="利率不能为空" > % /年
							    <span class="action-field-error" for="loanRate" style="color:red;"></span> -->
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">
								银行放款金额<span><font color="red">*</font></span>:
							</td>
							<td>
								<input type="text" name="loanAmount" value="${voo.loanAmount}" class="tabInp w40 action-valid-field" data-action-valid-rule="required;number;maxlength:15;reg:^\d?$|^(\d+(\.\d{1,2})?)$;" data-action-valid-msg-required="银行批复金额不能为空" >
							    <span class="action-field-error" for="loanAmount" style="color:red;"></span>
							</td>
							<td width="15%" align="right" class="bg">
								放款期限<span><font color="red">*</font></span>:
							</td>
							<td>
								<input type="text" name="loanTerm" value="${voo.loanTerm}" class="tabInp w40 action-valid-field" data-action-valid-rule="number;required;" data-action-valid-msg-required="放款期限不能为空" >
							    <span class="action-field-error" for="loanTerm" style="color:red;"></span>
							</td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">
								实际放款日<span><font color="red">*</font></span>:
							</td>
							<td colspan="3">
								<@date value="${voo.loanDate}" id="loanDate" name="loanDate"  data\-action\-valid\-rule="required;"/>
							    <span class="action-field-error" for="loanDate" style="color:red;"></span>
							</td>
						</tr>	
					</tbody>
			</table>
		</div>
	
		</div>
</form>
		
		
		
		<!--增加银行还款计划  -->
	<div class="openBox">
	<h3>
		<i class="jtIco"></i>银行还款计划列表
	</h3>
	<div class="detaiTab">
			<div  class="dataBable"> 
				    <@pagination paginationInfo="paginationInfo"/>
					<table class="b_t_e5" width="100%" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr>
								 <td width="15%" align="right" class="bg">选择文件</td>
								 <td><span id="ttt">
								 		<@permission permissionName="repaymentImport">
													<@fileUpload url="/bank/import?billCode=${voo.billCode}&loanerName=${voo.loanerName}&idNum=${voo.loanerCard}" title="导入..."  />
										</@permission>
										</span>
										 <div><font color="red"><div id="errorMessage1"></div></font></div>
								</td>
							<tr>
							<tr>
								 <td align="right" class="bg"></td>
								 <td><a href="/paymentsRest/download?billCode=${voo.billCode}" >（下载导入模板）</a><font class="red ml10"> ${errorMessage}</font></td>
							<tr>
						</tbody>
					</table>
				</div>
		</div>
	</div>		
	
		<div class="clearfix tac mtb20"> 
			<input type="hidden" id="type" name ="type" value="${vo.type}">&nbsp;
			<input type="hidden" id="upload" name ="upload" value="${upload}">&nbsp;
			<input type="submit" id="bank_submit" class="btn_auto_30 btn_blue" value="保存">&nbsp;
		</div>
		
		
</div>
<@js>

   $("#bank_submit").click(function(){
      var upload = $("#upload").val();
      if(upload!='upload'){
         alert("保存前,请先上传还款计划");
      }else{
     	 $("#bank").submit();
      }
   
   });



</@js>
<@jsRender/>
